
const portal = {
  state: {
    setStatus: false,
    currentMenuId: null,
    dragCard: null,
    dragOverEvent: null,
    portalTypeList: []
  },
  mutations: {
    SET_STATUS: (state, satatus) => {
      console.log('SET_STATUS', satatus)
      state.setStatus = !!satatus
      if (!satatus) {
        state.currentMenuId = null
      }
    },
    SET_CURRENTMENUID: (state, id) => {
      console.log('SET_CURRENTMENUID', id)
      state.currentMenuId = id
    },
    SET_DRAGCARD: (state, card) => {
      console.log('SET_DRAGCARD')
      state.dragCard = card
    }
  },
  actions: {
    // 登录
    GetSourse ({ getters, commit }) {
      return new Promise((resolve, reject) => {
        console.log(getters)
        resolve()
        // TODO:根据用户id查询门户树形数据
      })
    }
  }
}

export default portal
